Skip to content

Add Jackson 3 plugin and migrate publishing to maven-publish#185

Open
Sboti03 wants to merge 7 commits intoorigin-energy:masterfrom
Sboti03:feature/jackson3
Open

Add Jackson 3 plugin and migrate publishing to maven-publish#185
Sboti03 wants to merge 7 commits intoorigin-energy:masterfrom
Sboti03:feature/jackson3

Conversation

@Sboti03
Copy link
Copy Markdown

@Sboti03 Sboti03 commented Apr 17, 2026

What changed

Build and publishing

  • upgraded the Gradle build setup
  • migrated publishing from legacy maven / uploadArchives to maven-publish
  • updated release workflows to use publish
  • consolidated shared JUnit 5 and dependency configuration
  • kept publishToMavenLocal working with the upgraded build

Jackson 3 support

  • added a new java-snapshot-testing-plugin-jackson3 module
  • introduced Jackson 3 serializer implementations and tests
  • added snapshot fixtures for the new module
  • updated the README with Jackson 2 vs Jackson 3 usage examples

Validation

Ran:

./gradlew publishToMavenLocal
./gradlew :java-snapshot-testing-plugin-jackson3:test publishToMavenLocal

Notes

  • existing Java 8-targeted modules remain unchanged in intent
  • Jackson 3 support is provided as a separate module rather than changing the existing Jackson 2 plugin
  • the branch history is intentionally split into two commits for easier review

fixes #183

Comment thread gradle/publishing.gradle Outdated
Comment thread build.gradle Outdated
mavenCentral()
}

if (subproject.name == 'java-snapshot-testing-plugin-jackson3') {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this long if else needed as it wasn't required previously? Will the code work without it?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Jackson 3 module needs Java 17 because Jackson 3 artifacts require Java 17.
The long root if/else is not needed the default can stay Java 11 and Jackson 3 can override locally.

Comment thread build.gradle Outdated
Comment thread build.gradle
Comment thread build.gradle
Comment thread README.md
Comment thread README.md Outdated
Comment thread gradle/publishing.gradle
afterEvaluate {
if (project.hasProperty("sign")) {
signing {
sign publishing.publications
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did this get separated from the project.hasProperty("sign") step?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because publishing metadata is required for every Maven publication.
Signing is optional and should only control signature generation.

@Sboti03 Sboti03 requested a review from jackmatt2 April 21, 2026 15:31
@Sboti03
Copy link
Copy Markdown
Author

Sboti03 commented Apr 21, 2026

@jackmatt2 I've made the fixes you requested and fixed the pipelines.

runs-on: ${{ matrix.os }}
strategy:
matrix:
java_version: [ '8' ]
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can the versions remain here so they don't need to be duplicated

runs-on: ${{ matrix.os }}
strategy:
matrix:
java_version: [ '8' ]
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need to continue to support java 8 - otherwise we break these clients

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Incompatibility with Jackson 3/ Spring Boot 4

2 participants